<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}

<div class="x-nav">
	<span class="layui-breadcrumb">
		<a>首页</a>
		<a>会员管理</a>
		<a>彩票投注</a>
	</span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
		<i class="layui-icon" style="line-height:30px">ဂ</i>
	</a>
	<!--<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="?m={$m}&c={$c}&a=add" title="添加">
		<i class="layui-icon" style="line-height:30px">添加</i>
	</a>-->
</div>

<div class="x-body">
	<div id="searchid" class="layui-clear margin-b10">
		<form name="searchform" class="layui-form" action="?" method="get" >
			<input type="hidden" name="m" value="{$m}" />
			<input type="hidden" name="c" value="{$c}" />
			<input type="hidden" name="a" value="{$a}" />
			<div class="left">
				<select name="cid">
					<option value="0">选择彩种</option>
					{loop $lottery as $val}
                    <option value="{$val['id']}"{if $cid == $val['id']} selected="selected"{/if} >{$val['title']}[{_e $val['credit'] ? '信' : '官'}]</option>
                    {/loop}
				</select>
			</div>
			<div class="left margin-l10" style="width:100px;">
				<select name="status">
					<option value="0">选择状态</option>
					{loop $statuss as $key => $val}
						{_ !$key && $key = -1}
                    <option value="{$key}"{if $status == $key} selected="selected"{/if} >{$val}</option>
                    {/loop}
				</select>
			</div>
			<div class="left margin-l10">
				<input name="dt1" id="dt1" type="text" value="{$dt1}" class="layui-input date" style="width:100px;" placeholder="下注时间" />
			</div>
			<div class="left margin-l10" style="padding-top:10px;">~</div>
			<div class="left margin-l10">
				<input name="dt2" id="dt2" type="text" value="{$dt2}" class="layui-input date" style="width:100px;" placeholder="下注时间" />
			</div>
			<div class="left margin-l10">
				<input name="title" id="title" type="text" value="{$title}" class="layui-input" style="width:260px;" placeholder="请输入关键词" />
			</div>
			<div class="left margin-l10">
				<input type="submit" name="search" class="layui-btn" value="搜索" />
			</div>
		</form>
	</div>
	
	<table class="layui-table">
		<thead>
			<tr>
				<th>彩种</th>
				<th>期号</th>
				<th>会员</th>
				<th>玩法</th>
				<th>投注</th>
				<th>金额</th>
				<th>奖金</th>
				<th>开奖号</th>
				<th>投注时间</th>
			</tr>
		</thead>
		<tbody id="datalist">
			{loop $data as $val}
			<tr data-id="{$val['id']}" data-cid="{$val['cid']}">
				<td><a href="?m={$m}&c={$c}&a={$a}&cid={$val['cid']}">{$lottery[$val['cid']]['title']}[{_e $lottery[$val['cid']]['credit'] ? '信' : '官'}]</a></td>
				<td><a href="?m={$m}&c={$c}&a={$a}&iid={$val['iid']}">{$val['period']}</a></td>
				<td><a href="?m={$m}&c={$c}&a={$a}&uid={$val['uid']}">{$val['username']}</a></td>
				<td><a href="?m={$m}&c={$c}&a={$a}&pid={$val['pid']}">{$val['pname']}</a></td>
				<td>{$val['rednum']}</td>
				<td>{$val['money']}</td>
				<td>{$val['prize']}</td>
				<td>{$val['result']}</td>
				<td>{date('Y-m-d H:i:s',$val['dateline'])}</td>
			</tr>
			{/loop}
		</tbody>
	</table>
	<div class="layui-clear">
		<div id="pages" class="layui-laypage right">{$multi}</div>		
	</div>
</div>

{template index/footer}